/**
 * 服务器信息
 * @author rxliuli
 */
class ServerInfo {
    /**
     * 构造函数
     * @param {Object} [option] 可选参数
     * @param {String} host 服务器主机名/ip
     * @param {CpuStatistic} cpuInfo cpu信息
     * @param {String} appStatus 应用状态, 1：正常，2：不正常
     * @param {MemoryInfo} memoryInfo 内存信息
     * @param {Number} networkStream 网卡瞬时流量
     * @param {Array.<DiskInfo>} diskInfoList 硬盘信息
     * @param {...Object} [option.args] 其他参数
     */
    constructor({
                    host,
                    cpuInfo = new CpuStatistic(),
                    appStatus,
                    memoryInfo = new MemoryInfo(),
                    networkStream,
                    diskInfoList,
                    ...args
                } = {}) {
        this.host = host
        this.cpuInfo = cpuInfo
        this.appStatus = appStatus
        this.memoryInfo = memoryInfo
        this.networkStream = networkStream
        this.diskInfoList = diskInfoList
        Object.assign(this, args)
    }
}